# coding=utf-8
import os,re,codecs,json
class ArgvParamet:
    def Trim(self, str):
        str2 = str.strip()
        str3 = re.sub(' ', '', str)
        return str3
    def mkdir(self, path):
        if not os.path.isdir(path):
            os.mkdir(path)

    def __init__(self, argv):
        obj = {"MinValue": 1920}
        for str in argv:
            pb = str.split('=')
            if len(pb) > 1:
                name = self.Trim(pb[0])
                name = name.replace('--', '')
                value = self.Trim(pb[1])
                obj[name] = value
        self.obj = obj
class openjson:
    def __init__(self,file):
        self.value=None
        if os.path.exists(file):
            Json_File = codecs.open(file,encoding='utf-8')
            _str = Json_File.read()
            Json_File.close()
            config = json.loads(_str)
            self.value=config